package core;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;


public class Main {
	public static void main(String[] args){
		Generator generator = new Generator();
		generator.setShape(new Sinus());
		generator.setFreq(10);
		
		Oscilloscope osc = new Oscilloscope();
		
		List<Integer> aa = new ArrayList<Integer>();
		for(int i = 0; i<10; i++){
			aa.add(i);
		}
		
		Iterator<Integer> it = aa.iterator();

		System.out.println("1 = "+it.next());
		aa.remove(0);
		System.out.println("2 = "+it.next());

		System.out.println("3 = "+it.next());

		System.out.println("4 = "+it.next());
		
		/*
		ModulatorAM modulator = new ModulatorAM();
		generator.connect(new UnitInput(modulator, 0));
		modulator.setCurrierFreq(1000);
		DemodulatorAM demodulator = new DemodulatorAM();
		modulator.connect(new UnitInput(demodulator, 0));
		demodulator.setCurrierFreq(1000);
		demodulator.connect(new UnitInput(osc, 0));
		modulator.connect(new UnitInput(osc, 1));
        */
		
		
		
		/*ModulatorFM fmmod = new ModulatorFM();
		generator.connect(new UnitConnection(fmmod, 0));
		fmmod.setCurrierFreq(1000);
		fmmod.setFreqDev(500);
		
		DemodulatorFM fmdemod = new DemodulatorFM();
		fmmod.connect(new UnitConnection(fmdemod, 0));
		fmdemod.setCurrierFreq(1000);
		
		fmdemod.connect(new UnitConnection(osc, 1));
		fmmod.connect(new UnitConnection(osc, 0));
		*/
		
		/*
		DemodulatorAM fmdemod2 = new DemodulatorAM();
		fmmod.connect(new UnitInput(fmdemod2, 0));
		fmdemod2.setCurrierFreq(1000);
		fmdemod2.setOffset(Math.PI/2);
		fmdemod2.connect(new UnitInput(osc, 1));
		*/
		
		/*Generator generator2 = new Generator();
		generator2.setShape(new Sinus());
		generator2.setFreq(100);
		
		Adder add = new Adder();
		add.setRatio0(0.8);
		add.setRatio1(0.2);
		generator2.connect(new UnitInput(add, 0));
		generator.connect(new UnitInput(add, 1));
		
		FIRFilter fir = new FIRFilter(new FIRHilbertCoeffGen(1000));
		add.connect(new UnitInput(fir, 0));
		
		
		
		add.connect(new UnitInput(osc, 0));
		fir.connect(new UnitInput(osc, 1));
		*/
		/*
		FIRFilter fir = new FIRFilter(new FIRHilbertCoeffGen(100));
		generator.connect(new UnitInput(fir, 0));
		
		fir.connect(new UnitInput(osc, 0));
		generator.connect(new UnitInput(osc, 1));
		*/
		/*for(int i=0; i<100; i++){
        	sygnal.Generate(0.001);
        }*/
	}
}
